﻿<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" >
<head>
    <title>无标题页</title>
    <script type="text/javascript">
       /* var arr = new Array();
        arr[0] = "tom";
        arr[1] = "lily";
        arr[2] = "kite";
        for(var i=0;i<3;i++)
        {
            alert(arr[i]);
        }*/
        
        function GetMax(arr)
        {
            var max = arr[0];
            for(var i=0;i<arr.length;i++)
            {
                if(arr[i] > max)
                {
                    max = arr[i];
                }
            }
            return max;
        }
        
        var arr1 = new Array();
        arr1[0] = 10;
        arr1[1] = 11;
        arr1[2] = 23;
        alert(GetMax(arr1));
    </script>
</head>
<body>

</body>
</html>
